package com.chinaedu.oc.sdk.service;

import com.chinaedu.oc.sdk.bo.ProductUpload;
import com.chinaedu.oc.sdk.bo.Sign;
import com.chinaedu.oc.sdk.result.Result;
import com.chinaedu.oc.sdk.util.CreateSign;
import com.chinaedu.oc.sdk.util.SendRequest;

public class ProductUploadService {
	public Result upload(String url, String key, ProductUpload productUpload) {
		
		CreateSign cs = new CreateSign();
		Long mill = System.currentTimeMillis();
		Sign sign = cs.createSign(key, productUpload.getProduct(), mill);
		
		SendRequest sq = new SendRequest();
		
		return sq.send(sign, productUpload, url);
	}
}
